#pragma once

#include <Assert.h>
#include <QQmlApplicationEngine>

namespace TC
{
    namespace Qml
    {
        class Engine : public QQmlApplicationEngine
        {
			Q_OBJECT
				Q_PROPERTY(bool useWindowsFileSystem MEMBER useWindowsFileSystem)
                Q_PROPERTY(QString qmlUsing MEMBER qmlUsing NOTIFY qmlUsingChanged)
        private:
            Engine();
        public:
            ~Engine();

        public:
            Q_INVOKABLE void trim();
			Q_INVOKABLE void addImportPath(const QString& dir);
			Q_INVOKABLE void removeImoportPath(QString path);
		public:
			Q_SIGNAL void qmlUsingChanged();

		public:
			bool useWindowsFileSystem = false;
			QString qmlUsing;
		public:
            static Engine* instance();
        private:
            static Engine* _instance;
        };
    }
}